﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace dpdw.Structure.CompositePattern
{
    public class MenuItem : MenuComponent
    {
        string name;
        string description;
        bool vegetarian;
        double price;

        public MenuItem(string name,
            string description, bool vegetarian, double price)
        {
            this.name = name;
            this.description = description;
            this.vegetarian = vegetarian;
            this.price = price;
        }

        public override string GetName()
        {
            return this.name;
        }

        public override string GetDescription()
        {
            return this.description;
        }

        public override double GetPrice()
        {
            return this.price;
        }

        public override bool IsVegetarian()
        {
            return this.vegetarian;
        }

        public override void Print()
        {
            System.Diagnostics.Trace.WriteLine("===========MenuItem============");
            System.Diagnostics.Trace.WriteLine(
                this.name + "-->" + this.description + "-->" + this.price.ToString());
        }
    }
}
